package cn.ljq.service;

import cn.ljq.dao.CourseMapper;
import cn.ljq.entity.Course;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

public class CourseServiceImpl implements CourseService {

    @Autowired
    CourseMapper courseMapper;

    @Override
    public List<Course> findAll() {
        return courseMapper.findAll();
    }

    @Override
    public Course findOne(String cno) {
        return courseMapper.findOne(cno);
    }

    @Override
    public int add(Course course) {
        return courseMapper.add(course);
    }

    @Override
    public int update(Course course) {
        return courseMapper.update(course);
    }

    @Override
    public int del(String cno) {
        return courseMapper.del(cno);
    }

    @Override
    public List<Course> findPage(int n1, int n2) {
        return courseMapper.findPage(n1,n2);
    }

    @Override
    public int getTotal() {
        return courseMapper.getTotal();
    }
}
